package com.komorebishao.crm.controller;

import com.komorebishao.crm.pojo.CrmUser;
import com.komorebishao.crm.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Author: KomorebiShao
 * @Description:
 * @Date: Created in 2020-07-03
 * @Modified By:
 */
@Controller
public class TestController {
    @Autowired
    UserService userService;
    @RequestMapping("/test")
    public String test(Model model){
        CrmUser user = userService.getUserById(5);
        model.addAttribute("user",user);
        return "index";
    }
}
